import React, {Component} from 'react';
import {
    View,
    StyleSheet,
    Text,
    Image
} from 'react-native'

export default class WelcomePage extends Component {
    constructor(props) {
        super(props);
    }

    componentDidMount() {
        this.timer = setTimeout(() => {
            this.props.navigation.navigate('Home')
        }, 2000);
    }

    componentWillUnmount() {
        this.timer && clearTimeout(this.timer);
    }

    render() {
        return (
            <View style={styles.container}>
                <Image style={styles.img} source={require("../../res/images/logo.png")}/>
            </View>)
    }
}
const styles = StyleSheet.create({
    container: {
        display:"flex",
        justifyContent:"center",
        alignItems:"center",
        backgroundColor:"#fff",
    },
    img: {
        width:200,
        resizeMode:Image.resizeMode.contain,
    }
})
